<?php
/**
 *
 *
 */
class Yz_Property_Id
    extends Yz_Property_Abstract
{

    /**
     *  @param array|null config
     *  @param varargs
     */
    public function __construct($config=null)
    {
        debug();
        $this->init(func_get_args());
    }

    /** Test if a value is suitable for the property, possibly adjust
     *  @param mixed value
     *  @return the adjusted value
     *  @throw TypeError
     *  @throw ValueError
     */
    public function testValue($value)
    {
        $value = Yz_Int::test($value);
        if ($value <= 0)
            throw ValueError::_new_();
        return $value;
    }

}
